import {
  ADD_COUNTER,
  ADD_TO_CART,
  CHECK_CLICK
} from './mutation-types'

export default {
  [ADD_COUNTER](state,payload){
    payload.counter++;
  },
  [ADD_TO_CART](state,payload){
    payload.checked = false;
    state.cartList.push(payload);
  },
  [CHECK_CLICK](state,payload){
    payload.checked = !payload.checked
  }
}